package com.distributer.settlement.comsumer;

import org.apache.kafka.clients.consumer.ConsumerRecord;

/**
 * 工作线程
 * 
 * @author Administrator
 *
 */
public class Worker implements Runnable {

	private ConsumerRecord<String, String> consumerRecord;

	public Worker(ConsumerRecord<String, String> record) {
		this.consumerRecord = record;
	}

	@Override
	public void run() {
		// 这里写你的消息处理逻辑，本例中只是简单地打印消息
		System.out.println(Thread.currentThread().getName() + " partition " + consumerRecord.partition() + " the message with offset: " + consumerRecord.offset()
				+ " message content: " + consumerRecord.value());
	}

}
